#if !defined(ximera_gui_cegui_inputhandler_hpp)
#define ximera_gui_cegui_inputhandler_hpp

// -----------------------------------------------------------

#include <ximera/system/application.hpp>
#include <ximera/input/idevice.hpp>
#include <ximera/input/imouse.hpp>
#include <ximera/input/ikeyboard.hpp>
#include <ximera/common/signal.hpp>

namespace ximera { namespace gui { namespace cegui
{
    class XIMERA_PLUGIN_API InputHandler
    {
    public:
        InputHandler(system::Application& app);
        ~InputHandler();

        void onMouseMove(input::IDevice* sender, Byte axisIndex, Real lastValue, Real newValue, Real relValue);
        void onMouseDown(input::IMouse* sender, input::MouseCode const& mouseCode);
        void onMouseUp(input::IMouse* sender, input::MouseCode const& mouseCode);

        void onKeyDown(input::IKeyboard* sender, input::KeyCode const& keyCode);
        void onKeyUp(input::IKeyboard* sender, input::KeyCode const& keyCode);

    private:
        system::Application& app;
        SignalConnection _mouseMove;
        SignalConnection _mouseDown;
        SignalConnection _mouseUp;
        SignalConnection _keyDown;
        SignalConnection _keyUp;
    };
}}}

// -----------------------------------------------------------

#endif
